package com.ls.order.service;

import com.alipay.api.AlipayApiException;
import com.ls.order.pojo.entity.Order;

public interface AliPayService {

    /**
    * @Description: 预下单
    * @return: java.lang.String
    * @Author: konglz
    * @Date: 2023/5/3
    */
    public String preCreate(Integer id, Integer userId) throws Exception;

    /**
    * @Description: 查询订单状态
    * @return: boolean
    * @Author: konglz
    * @Date: 2023/5/3
    */
    public boolean query(String id) throws AlipayApiException;

    /**
    * @Description: 取消订单
    * @return: boolean
    * @Author: konglz
    * @Date: 2023/5/3
    */
    public boolean cancel(Order order) throws AlipayApiException;

    /**
    * @Description: 退款
    * @return: boolean
    * @Author: konglz
    * @Date: 2023/5/3
    */
    public boolean refund(Order order) throws AlipayApiException;
}
